﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="quit_school.aspx.cs" Inherits="quit_school" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title>退学处理</title>
    <style type="text/css">
        .auto-style1 {
            font-size: x-large;
        }
        .auto-style2 {
            text-align: center;
        }
        .auto-style3 {
            font-size: large;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <div>
    
        <div class="auto-style2">
            <strong>
            <span class="auto-style1">
            <br />
            <br />
    
            </span>
            <span class="auto-style3">请选择专业：</span><asp:DropDownList ID="DropDownList1" runat="server" DataSourceID="SqlDataSource2" DataTextField="Smajor" DataValueField="Smajor" AutoPostBack="True" CssClass="auto-style3">
        </asp:DropDownList>
            </strong>
        </div>
        <asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:XSXKConnectionString4 %>" SelectCommand="SELECT DISTINCT [Smajor] FROM [Student]"></asp:SqlDataSource>
        <div class="auto-style2">
        <br />
            <span class="auto-style3"><strong>请选择班级：</strong></span><strong><asp:DropDownList ID="DropDownList2" runat="server" DataSourceID="SqlDataSource3" DataTextField="Sclass" DataValueField="Sclass" AutoPostBack="True" CssClass="auto-style3">
        </asp:DropDownList>
            </strong>
        </div>
        <asp:SqlDataSource ID="SqlDataSource3" runat="server" ConnectionString="<%$ ConnectionStrings:XSXKConnectionString4 %>" SelectCommand="SELECT DISTINCT [Sclass] FROM [Student]"></asp:SqlDataSource>
        <br />
    
    </div>
        <center>
        <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames="Sno" DataSourceID="SqlDataSource1" AllowPaging="True" AllowSorting="True" CellPadding="4" ForeColor="#333333" GridLines="None">
            <AlternatingRowStyle BackColor="White" />
            <Columns>
                <asp:BoundField DataField="Sno" HeaderText="学号" ReadOnly="True" SortExpression="Sno" />
                <asp:BoundField DataField="Sname" HeaderText="姓名" SortExpression="Sname" />
                <asp:BoundField DataField="Sclass" HeaderText="班级" SortExpression="Sclass" />
                <asp:BoundField DataField="Ssex" HeaderText="性别" SortExpression="Ssex" />
                <asp:BoundField DataField="Smajor" HeaderText="专业" SortExpression="Smajor" />
                <asp:BoundField DataField="Syear" HeaderText="年龄" SortExpression="Syear" />
                <asp:BoundField DataField="flag_quit" HeaderText="是否退学" SortExpression="flag_quit" />
                <asp:HyperLinkField DataNavigateUrlFields="Sno,Sname" DataNavigateUrlFormatString="quit_school_detail.aspx?Sno={0}&amp;Sname={1}" HeaderText="退学操作" Text="办理退学" Target="_parent" />
            </Columns>
            <EditRowStyle BackColor="#7C6F57" />
            <FooterStyle BackColor="#1C5E55" Font-Bold="True" ForeColor="White" />
            <HeaderStyle BackColor="#1C5E55" Font-Bold="True" ForeColor="White" />
            <PagerStyle BackColor="#666666" ForeColor="White" HorizontalAlign="Center" />
            <RowStyle BackColor="#E3EAEB" />
            <SelectedRowStyle BackColor="#C5BBAF" Font-Bold="True" ForeColor="#333333" />
            <SortedAscendingCellStyle BackColor="#F8FAFA" />
            <SortedAscendingHeaderStyle BackColor="#246B61" />
            <SortedDescendingCellStyle BackColor="#D4DFE1" />
            <SortedDescendingHeaderStyle BackColor="#15524A" />
        </asp:GridView>
            </center>
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:XSXKConnectionString4 %>" SelectCommand="SELECT [Sno], [Sname], [Sclass], [Ssex], [Smajor], [Syear], [flag_quit] 
FROM [Student]
WHERE (Smajor=@Smajor AND Sclass=@Sclass)">
            <SelectParameters>
                <asp:ControlParameter ControlID="DropDownList1" Name="Smajor" PropertyName="SelectedValue" />
                <asp:ControlParameter ControlID="DropDownList2" Name="Sclass" PropertyName="SelectedValue" />
            </SelectParameters>
        </asp:SqlDataSource>
    </form>
</body>
</html>
